import request from '@/router/axios';
// 数据库配置

// 查询条件列表 分页
export const page = (current, size, params) => {
    return request({
        url: '/api/user-api/mx-database/page',
        method: 'get',
        params: {
            ...params,
            current:current,
            size:size,
        }
    })
}

// 保存
export const save = (data) => {
    return request({
        url: '/api/user-api/mx-database/save',
        method: 'post',
        data: data
    })
}

// 更新
export const update = (data) => {
    return request({
        url: '/api/user-api/mx-database/update',
        method: 'post',
        data: data
    })
}

// 删除
export const del = (params) => {
    return request({
        url: '/api/user-api/mx-database/delete',
        method: 'get',
        params
    })
}

// 详情
export const detail = (params) => {
    return request({
        url: '/api/user-api/mx-database/detail',
        method: 'get',
        params
    })
}
// 启用数据库
export const startUsing = (params) => {
    return request({
        url: '/api/user-api/mx-database/startUsing',
        method: 'get',
        params
    })
}
// 禁用数据库
export const stopUsing = (params) => {
    return request({
        url: '/api/user-api/mx-database/stopUsing',
        method: 'get',
        params
    })
}

// 测试链接
export const queryConnection = (params) => {
    return request({
        url: '/api/user-api/mx-database/queryConnection',
        method: 'post',
        data:params
    })
}
